﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Portal/Master/Portal.Master" AutoEventWireup="true" CodeBehind="UserInfoEdit.aspx.cs" Inherits="Besture.UI.Portal.UserCenter.UserInfoEdit" %>
<%@ Import Namespace="Besture.Common.Helper" %>

<%@ Register Src="~/Admin/Control/SelectCity.ascx" TagPrefix="cms" TagName="SelectCity" %>
<%@ Register Src="~/Control/UploadSinglePhoto.ascx" TagPrefix="uc2" TagName="UploadSinglePhoto" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
     <link href="/Resource/css/member.css" rel="stylesheet" />
    <link href="/Admin/PlugIn/jquery.uploadify/uploadify.css" rel="stylesheet" />
    <script type="text/javascript" src="/Admin/Themes/Js/jquery.validate.js"></script>
    <script type="text/javascript" src="/Resource/source/My97DatePicker/calendar.js"></script>
    <script type="text/javascript" src="/Resource/source/My97DatePicker/WdatePicker.js" ></script>
    <script type="text/javascript" src="/Admin/PlugIn/jquery.uploadify/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/Admin/PlugIn/jquery.uploadify/jquery.uploadify-3.1.min.js"></script>
    <style type="text/css">
        label.error {left: 8px;top: 0;}
         .error {left: 8px;top: 0;}
        .SpanInputColor {border: 0px solid buttonface;  overflow:hidden;  }  
        .uploadify div {background-image: url(/Resource/images/select-pic-imge.png) !important;}
        .element div img{width: 160px;height: 160px;}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="wrap">
        <div class="main member ">
            <div class="vipbanner"></div>
            <div class="container">
                <div class="layout_side">
                    <div class="side_nav">
                        <cms:UserNav runat="server" ID="UserNav" />
                    </div>
                </div>
                <div class="layout_main personinfomation editperson">
                    <div class="vipcon">
                        <div class="viptitle1"></div>
                        <div class="grand">会员等级：<span>金牌会员</span></div>
                        <div class="pro">
                        </div>
                        <div class="pertitle">个人信息</div>
                        <table style="width: 100%;">
                            <tr>
                                <td> </td>
                                <td>
                                    <uc2:UploadSinglePhoto width="120" height="120" runat="server" ID="imgimgPath" Required="False" Tips="请上传图片" />      
                                    <br /><span class="desc" style="padding-left: 52px;">图片格式：GIF、JPG、JPEG、PNG最适合尺寸120*120像素</span>
                                </td>
                            </tr>
                            <tr>
                                <td width="90">手机</td>
                                <td>
                                    <input type="text" readonly="readonly" runat="server" id="txtPhone" class="none required mobile" />
                                </td>
                            </tr>
                            <tr>
                                <td>邮箱</td>
                                <td>
                                    <input type="text" readonly="readonly" runat="server" id="txtEmail" class="none required email" />
                                </td>
                            </tr>
                            <tr>
                                <td>昵称<span class="themecolor">*</span></td>
                                <td>
                                    <input type="text" id="txtNickName" runat="server" class="required " /></td>
                            </tr>
                            <tr>
                                <td>姓名<span class="themecolor">*</span></td>
                                <td>
                                    <input type="text" id="txtRealName" runat="server" class="required "  /></td>
                            </tr>
                            <tr>
                                <td>性别<span class="themecolor">*</span></td>
                                <td>
                                    <asp:RadioButton ID="rb1" GroupName="rb" runat="server" TabIndex="1" Text="男" />
                                    <asp:RadioButton ID="rb0" GroupName="rb" runat="server" TabIndex="0" Text="女" />
                                </td>
                            </tr>
                            <tr>
                                <td>生日</td>
                                <td>
                                    <input type="text" id="txtBirthday" onfocus="WdatePicker({isShowClear:false,readOnly:true})" runat="server" class="Wdate inputText required date"/>
                                </td>
                            </tr>
                            <tr>
                                <td>联系电话</td>
                                <td>
                                    <input runat="server" type="text" id="txtAreaCode" placeholder="区号" style="width: 63px;" />&nbsp;
                                    <input runat="server" type="text" id="txtTel" placeholder="电话" style="width: 154px;" />&nbsp;
                                    <input type="text" runat="server" id="txtTelExt" placeholder="分机" style="width: 64px;" />
                                </td>
                            </tr>
                            <tr>
                                <td>常用出发城市</td>
                                <td><cms:SelectCity runat="server" ID="SelectCity" /></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td colspan="2">
                                    <asp:Button ID="btnSave" runat="server"  class="edite" Text="保存" OnClick="BtnSaveClick" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <br class="clear" />
            </div>
        </div>
        <!-- //main -->
    </div>
    <!-- //wrap -->
    <script type="text/javascript">
        $(function () {

            //会员等级 html
            var vs = "<span style='display: inline-block; width: 400px;  height: 22px; background: #ddd; border-radius: 30px;'> "
                    + " <span style='display: inline-block;width: " + $("#nightNumber").text().trim() + "%;background: #b10b4a; height: 22px;border-radius: 30px;'></span>"
                    + " </span><span class='themecolor'>" + $("#SNightName").text().trim() + "</span> "
                    + " （距离您成为金牌会员还有(" + (100 - $("#nightNumber").text().trim()) + ")积分&nbsp;&nbsp;&nbsp;" + $("#nightNumber").text().trim() + "/100积分)";

            $(".grand span").text($("#SNightName").text().trim());
            $(".pro").html(vs);

            $(".personinfomation table tr").each(function () {
                $(this).children("td:not(:first)").css("padding-left", "35px");
            });
            $(".edit").each(function () {
                var _this = $(this);
                _this.click(function () {

                    _this.parent().prev().children("input").removeClass("none").addClass("show").removeAttr("readonly");
                    return false;
                });
            });

            //点击窗体其他位置关闭框
            $(window).click(function (e) {
                if (!$(e.target).is(".edit")) {
                    $(".edit").parent().prev().children("input").addClass("none");
                }
            });

            $(".date_input").date_input();
        })
    </script>
</asp:Content>
